#ifndef _USER_ZW101_H
#define _USER_ZW101_H

#include "user_include.h"

#define PS_GETIMAGE         0X01
#define PS_GENCHAR          0X02
#define PS_MATCH            0X03
#define PS_SEARCH           0X04
#define PS_REGMODEL         0X05
#define PS_STORECHAR        0X06
#define PS_LOADCHAR         0X07
#define PS_UPCHAR           0X08
#define PS_DOWNCHAR         0X09
#define PS_UPIMAGE_4BIT     0X0A
#define PS_DOWNIMAGE_4BIT   0X0B
#define PS_DELETCHAR        0X0C
#define PS_EMPTY            0X0D
#define PS_WRITEREG         0X0E
#define PS_READSYSPARA      0X0F


// zw101
void PS_GetImage(void);
void PS_GenChar(uint8_t bufferId);
void PS_Match(void);
void PS_Search(uint8_t bufferId, uint16_t start, uint16_t num);
void PS_RegModel(void);
void PS_StoreChar(uint8_t bufferId, uint16_t pageId);
void PS_LoadChar(uint8_t bufferId, uint16_t pageId);
void PS_UpChar(uint8_t bufferId);
void PS_DownChar(uint8_t bufferId);
void PS_UpImage(void);
void PS_DownImage(void);
void PS_DeletChar(uint16_t pageId, uint16_t num);
void PS_Empty(void);
void PS_WriteReg(uint8_t reg, uint8_t dat);
void PS_ReadSysPara(void);
void PS_SetPwd(uint32_t pwd);
void PS_VfyPwd(uint32_t pwd);
void PS_SetChipAddr(uint32_t addr);
void PS_WriteNotepad(uint8_t page, uint8_t *conten);
void PS_ReadNotepad(uint8_t page);
void PS_ReadINFpage(void);
void PS_ValidTempleteNum(void);
void PS_ReadIndexTable(uint8_t index);
void PS_GetEnrollImage(void);
void PS_Cancel(void);
void PS_AutoEnroll(uint16_t id, uint8_t num, uint16_t param);
void PS_AutoIdentify(uint8_t level, uint16_t id, uint16_t param);
void PS_Sleep(void);
void PS_GetChipSN(void);
void PS_HandShake(void);
void PS_CheckSensor(void);
void PS_RestSetting(void);
void PS_ControlBLN(bln_param_t param);
void PS_GetImageInfo(void);
void PS_SearchNow(uint16_t start, uint16_t num);
void PS_WriteEMPara(void);

void AutoLogin(auto_login_param_t param);
void AutoSearch(auto_search_param_t param);

void PS_AddFigureError(void);
void PS_CheckFigureError(void);

void user_zw101_handle(void);
void user_zw101_parse(uint8_t *data,uint32_t len);

#endif